
                set LOCAL_LIB=%CD%\lib\*
                set DIST_LIB=..\dist-lib\*
                set GAE_LIB_1=%GAE_ROOT%\lib\shared\*
                set GAE_LIB_2=%GAE_ROOT%\lib\shared\jsp\*
                set LIB=%LOCAL_LIB%;%DIST_LIB%;%GAE_LIB_1%;%GAE_LIB_2%

echo .
echo .
echo .          iCani Web Interface for GAE Project
echo .          ===================================
echo .
echo .          Creating the source.list file
echo .
                dir src\*.java /s /b >source.list || GOTO QUIT

echo .
echo .          Compiling the following list:
echo .          Using library path = %LIB%
echo .
                type source.list
echo .
echo .          Compilation result:
echo .
                javac -cp "%LIB%" -d war\WEB-INF\classes @source.list || GOTO QUIT

                
echo .
echo .          Building the exploded war file
echo .          ------------------------------
echo .
echo .              Copying to the war's root directory
echo .
                    xcopy resources\war\root\* war /e /y /f /i || GOTO QUIT
                
echo .
echo .              Copying to web-inf directory
echo .
                    xcopy resources\war\web-inf\* war\WEB-INF /e /y /f /i || GOTO QUIT
                
echo .
echo .              Copying to web-inf/classes directory
echo .
                    xcopy resources\war\classes\* war\WEB-INF\classes /e /y /f /i || GOTO QUIT
                
echo .
echo .              Copying to web-inf/lib directory
echo .
                    xcopy lib\* war\WEB-INF\lib /e /y /f /i || GOTO QUIT
                
echo .
echo .              Copying web source files directories
echo .
                    xcopy src\web\* war /e /y /f /i || GOTO QUIT


                
echo .
echo .          Copying the exploded war file to the dist-lib
echo .          ---------------------------------------------
echo .
                xcopy war\* ..\dist\war /e /y /f /i || GOTO QUIT
echo .
echo .


:QUIT
                